package com.gitbl.webchat.db;

import com.gitbl.webchat.db.bean.UserBean;
import com.gitbl.webchat.message.User;

public abstract class BeanConver {
    public static UserBean Convert(User u){
        UserBean ub =new UserBean();
        ub.setNickName(u.getNickName());
        ub.setPwd(DbUtils.getMD5(u.getPassword()));
        ub.setUserName(u.getUserName());
        return ub;
    }
    public static User Convert(UserBean ub){
        User u =new User();
        u.setNickName(ub.getNickName());
        //u.setPassword(pwd);
        u.setUserName(ub.getUserName());
        return u;
    }
}
